<ul id="hMessageContainer"></ul>

<input type="text" id="Hi" value="111"/>
<span id="MessageLabel1"></span>

<input type="text" id="Hi2" value="111"/>
<span id="MessageLabel2" ></span>

<script type="text/javascript" src="Validation_dev.js"></script>

<input type="button" value="Validate" onclick="javascript:alert(CW.Validate());"/>

<script type="text/javascript">
var setting = [1,"First","N","Hi","MessageLabel1","false","Please enter your name","3","5","the lenght of name is invalid","^\\w{3,5}$","Please enter a valid name"];
CW.Add(setting);
CW.Validation.Initial();
var handler = CW.EventHandler("Hi", CW.EventType.After);
handler.Handler = function(value, r) {
    if (value == "111") {
        this.Message = "Event Handler Test";
        return false;
    }
    else {
        this.Message = "";
        return true;
    }
}
CW.Handler.Add(handler);
</script>